<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<button onclick="add()">计数</button>
		<p id="demo">0</p>
		<script>
			var i=0;
			function muFunction(){
				return i++;
				
			}
			function add(){
				document.getElementById("demo").innerHTML=muFunction();
			}
		</script>
	</body>
</html>
